/* indent size: 2 */

module.exports = app => {
  const DataTypes = app.Sequelize;

  const Model = app.model.define('banner', {
    id: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      primaryKey: true,
      autoIncrement: true
    },
    name: {
      type: DataTypes.STRING(255),
      allowNull: false
    },
    url: {
      type: DataTypes.STRING(255),
      allowNull: false
    },
    sort: {
      type: DataTypes.INTEGER(3),
      allowNull: true
    },
    status: {
      type: DataTypes.INTEGER(1),
      allowNull: true,
      defaultValue: '0'
    },
    sub: {
      type: DataTypes.INTEGER(1),
      allowNull: true
    },
    jump: {
      type: DataTypes.INTEGER(1),
      allowNull: true
    },
    jump_url: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    created_at: {
      type: DataTypes.DATE,
      allowNull: true
    },
    updated_at: {
      type: DataTypes.DATE,
      allowNull: true
    },
    create_by: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    update_by: {
      type: DataTypes.DATE,
      allowNull: true
    }
  }, {
    tableName: 'banner'
  });

  Model.associate = function() {

  }

  return Model;
};
